//角色类
function Role({
    width,
    height,
    x,
    y
}) {
    this.width = width;
    this.height = height;
    this.x = x;
    this.y = y;
    this.element = null;
    this.isAlive = true;
};
Role.prototype = {
    constructor: Role,
    //在移动
    go: function () { //作声明，在后面赋值
    },
    //死亡
    die: function () {
        if (this.isAlive) {
            this.isAlive = false;
            this.element.parentNode.removeChild(this.element)
        }
    }
}